package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.domain.model.Book;
import com.example.demo.domain.model.Borrow;
import com.example.demo.domain.vo.BookVo;

import java.util.List;

public interface BookMapper extends BaseMapper<Book> {
    /**
     * 更新图书的状态为0
     * @param bookId
     * @return
     */
    int updatebookStatus( Long bookId);
    /**
     * 设置图书状态为1
     * @param bookId
     * @return
     */
    int updateStatus(Long bookId );
    /**
     * 查询到期还未归还的图书
     * @return
     */
    List<BookVo> getBookList ();

    /**
     * 更新批量bookId
     * @param bookIds
     * @return
     */
    int updateStatuses(List<Long> bookIds);
}
